use crossterm::terminal;

mod editor;
mod input;
mod keyboard;
mod output;

fn main() {
  terminal::enable_raw_mode().unwrap();

  let editor = editor::Editor::new();

  loop {
    if output::editor_refresh_screen().is_err() {
      output::die("unable to refresh screen");
    }
    if input::editor_process_keypress() {
      break;
    }
  }
  terminal::disable_raw_mode().unwrap();
}
